<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:html>
<head>
<title>EPrice ~ Listado de Productos</title>
<link href="css/estilos.css" rel="stylesheet" type="text/css">
</head>
<script language="javascript" type="">
function enviaParam(i, j){
  try{
    window.opener.document.getElementById('str_codigoProducto').value=i;
    window.opener.document.getElementById('str_descProducto').value=j;
    window.opener.focus();
  }catch(e){
    alert(e);
  }finally{
    window.close();
  }
}
</script>
<body>
<html:form action="/producto.do" method="get">
  <html:hidden property="action" value="listarProducto"/>
  <br>
  <table width="80%" border="0" align="center" cellpadding="0" cellspacing="1" class="tabla">
  <tr class="encabezadoTabla">
    <td colspan="3">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="30">&nbsp;<html:img width="17" height="23" src="images/img_loginFlecha.gif" alt=""/></td>
          <td>&nbsp;&nbsp;<strong class="font_general">Listado de Productosa</strong></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td height="0" colspan="3"></td>
  </tr>
  <tr class="encabezado_col font_general">
    <td colspan="3" align="center">Producto:&nbsp;&nbsp;
      <html:text styleClass="textfield" property="str_search"/>
      &nbsp;&nbsp;&nbsp;
      <html:submit styleClass="boton" value="Buscar" property="btn_buscar"/>
    </td>
  </tr>
  <tr>
    <td height="0" colspan="3"></td>
  </tr>
  <tr>
    <td width="9%" align="center" class="encabezado_col font_general">&nbsp;</td>
    <td width="14%" align="center" class="encabezado_col font_general">Codigo</td>
    <td width="77%" align="center" class="encabezado_col font_general">Descripcion</td>
  </tr>
  <logic:iterate id="producto" name="arrL_producto">
    <bean:define id="bool_row" name="producto" property="bool_fila"></bean:define>
    <tr>
      <td align="center" class="font_general <logic:equal name="bool_row" value="true">im</logic:equal>par"><a href="#" onclick='enviaParam("<bean:write name="producto" property="str_codProd"/>", "<bean:write name="producto" property="str_descProd"/>");'><html:img width="15" height="15" border="0" src="images/img_add.gif" alt=""/></a></td>
      <td align="center" class="font_general <logic:equal name="bool_row" value="true">im</logic:equal>par"><bean:write name="producto" property="str_codProd"/></td>
      <td align="left" class="font_general <logic:equal name="bool_row" value="true">im</logic:equal>par">&nbsp;<bean:write name="producto" property="str_descProd"/></td>
    </tr>
  </logic:iterate>
</table>
  <br>
</html:form>
</body>
</html:html>
